package com.dao;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.entity.TestTable;

@Repository
public class TestTableDao {
	@Resource
	private JdbcTemplate jdbcTemplate;

	public void saveData(TestTable testTable) {

		String sql = "INSERT INTO test_table(hostname,ip,message,evt_timestamp) values (?,?,?,?)";
		jdbcTemplate.update(sql, testTable.getHostName(),
				testTable.getIp(), testTable.getMessage(),
				testTable.getEvtTimestamp());
	}
}